package com.dm.cloud.auth.service.impl;

import com.dm.cloud.tkmybatis.service.BaseMapper;
import com.dm.cloud.auth.mapper.VAuthUserMapper;
import com.dm.cloud.auth.service.VAuthUserService;
import com.dm.cloud.auth.common.po.VAuthUser;
import com.dm.cloud.core.exception.CustomException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
   * @author hcx
   * @type VAuthUserServiceImpl.java
   * @desc VAuthUser serviceImpl
   */
@Service

@Transactional

public class VAuthUserServiceImpl implements VAuthUserService {


    @Autowired
    private VAuthUserMapper vAuthUserMapper;


    @Override
    public BaseMapper getMapper() {
        return vAuthUserMapper;
    }
    public void processBeforeOperation(VAuthUser entity, BaseOperationEnum operationEnum) throws CustomException {
    }

    public void processAfterOperation(VAuthUser entity, BaseOperationEnum operationEnum) throws CustomException {
        if (operationEnum.equals(BaseOperationEnum.SELECT)) {
            entity.setSalt(null);
            entity.setPassword(null);
        }
    }


}
